<?php
	function conn(){
		$conn = mysqli_connect("127.0.0.1","root","");
		if (!$conn) {
			echo "链接错误";
			exit();
		}
		if (!mysqli_query($conn,"use blog")) {
			echo "数据库链接失败";
			exit();
		}
		mysqli_query($conn,"set names utf8");
		return $conn;
	}
?>
